data segment
;define and init a variety: std::string(40, 'a'); dup: repeat
;name is address
  source_string db 40 dup('a');or dup(97)
data ends
extra segment
;define a string with 40 bytes but not init
  dest_string db 40 dup(?)
extra ends
;above all are fake(?) orders
code segment
;define main as subprocess
main proc far
  assume CS:code,DS:data,ES:extra; "assume " is address
start:;"start:" is address
  push ds
  mov ax, 0
  push ax
  mov ax, data
  mov ds, ax
  mov ax, extra
  mov es, ax
;core
  lea SI, source_string; mov SI, offset source_string
  lea DI, dest_string
  cld
  mov cx, 40
  rep movsb
  ret; return dos(when as main) or main(when as sub)
main endp; subprocess ends
code ends
end start; source process ends